<html>
<head>
<script type="text/javascript" src="..\..\ORMMA\js\OrmmaAdController.js"></script>
<script type="text/javascript">
function gotAccel(x,y,z)
{
document.getElementById("x").innerHTML = x ;
document.getElementById("y").innerHTML = y ;
document.getElementById("z").innerHTML = z ;
}
function resize(form)
{


//	var dimens = {"top": form.top.value,"left":form.left.value,"bottom":form.bottom.value,"right":form.right.value};
//	var idimens = {"top": 50,"left":50,"bottom":100,"right":100};
//	var fdimens = {"x": 150,"y":150,"width":300,"height":300};
	
	
	
	var props = {"transition": "dissolve",
			"navigation":"none",
			"use-background":false,
			"background-color" : "#000000",
			"background-opacity" : 1.0,
			"is-modal" : true};

	OrmmaAdController.resize(300,300);
//	OrmmaAdController.set(fdimens,fdimens,"http://www.weather.com");
//	OrmmaAdController.expand(fdimens,fdimens,"http://www.weather.com");
	
	//ORMMAControllerBridge.resize(JSON.stringify(dimens),JSON.stringify(props));

//	OrmmaAdController.addEventListener('assetReady', function(event,alias)  {
//        if (alias == 'xxx/newmap.jpg') {
//                var img = document.createElement('img');
//                img.src = alias;
//                document.body.appendChild(img);
//                OrmmaAdController.removeEventListener('assetReady', this);
//       }
//});
	

//	OrmmaAdController.addAsset("xxx/newmap.jpg","http://i.imwx.com/web/services/mobile/twci_logo.png");
	//OrmmaAdController.addAsset("abc","http://i.imwx.com/web/services/mobile/twci_logo.png");
//	OrmmaAdController.addAsset("../../abc","http://i.imwx.com/web/services/mobile/twci_logo.png");
	
	
//	OrmmaAdController.addAssets({
//        '/tmp/one.jpg':'http://i.imwx.com/web/services/mobile/twci_logo.png',
//        '/tmp/two.jpg':'http://i.imwx.com/web/services/mobile/twci_logo.png',
//        '/tmp/three.jpg':'http://i.imwx.com/web/services/mobile/twci_logo.png'
//});
//document.getElementById("x").innerHTML = OrmmaAdController.getScreenSize().height;
//OrmmaAdController.resize(dimens);
//OrmmaAdController.hide();
}

function closeAd(){
//	OrmmaAdController.hide();
//	OrmmaAdController.removeAsset("/tmp/one.jpg");
OrmmaAdController.close();
}


</script>
<script type="text/javascript">
function init()
{
OrmmaAdController.addEventListener('ready', function(event) { alert(event);});
OrmmaAdController.addEventListener('error', function(event) { alert(event);});
}
</script>
</head>


<body onload="init()">  
<a id="x">xxx</a>
<form name="size">
<INPUT TYPE="button" NAME="button" Value="Resize" onClick="resize(this.form)">
<INPUT TYPE="button" NAME="close" Value="Close" onClick="closeAd()">
top: <input type="text" name="top" /><br />
left: <input type="text" name="left" /><br />
bottom: <input type="text" name="bottom" /><br />
right: <input type="text" name="right" />
</form> 
</body></html>